package com.zjy.software.day11;

public class ExceptionTest {
    public static void main(String[] args) throws MyException {
        testException();
    }

    private static void testException() throws MyException {
        String name=null;
        try{
            boolean equals = name.equals("zhangsan");
        }catch(Exception e){
           throw new MyException("传入字符串比较错误");
        }
    }
}
